// CustomProperty.h

#pragma once

using namespace System;

namespace DsoFileNET {

	/// <summary>Property class</summary>
	/// <typeparam name="T">Type of the Property Enum</typeparam>
	generic <typename T>
	public ref class CustomProperty
	{
	private:
		T			propId;
		String^		name;
		Object^		data;

	public:
		//
		// Methods
		//

		/// <summary>Creates a new instance</summary>
		/// <param name="name">Property name</param>
		/// <param name="propId">Property Id</param>
		/// <param name="data">Property Value</param>
		/// <param name="newItem">Is this a new property</param>
		CustomProperty(String^ name, T propId, Object^ data, bool newItem);

		//
		// Properties
		//

		property String^ Name { String^ get(); }
		property DsoFileNET::FilePropertyType Type { DsoFileNET::FilePropertyType get(); }
		property Object^ Value { Object^ get(); void set(Object^ value); }
		property T PropId { T get(); }
	};
}
